import { createRouter, createWebHistory } from "vue-router";
const routes = [
  {
    path: "/login",
    name: "login",
    component: () => import("@/views/Login.vue"),
  },
  {
    path: "/",
    name: "main",
    redirect: "/home",
    component: () => import("@/views/Main.vue"),
    // children:[
    //   {
    //     path: '/home',
    //     name: 'home',
    //     component: () => import("@/views/Home.vue")
    //   },
    //   {
    //     path: '/user',
    //     name: 'user',
    //     component: () => import("@/views/User.vue")
    //   },
    //   {
    //     path: '/mall',
    //     name: 'mall',
    //     component: () => import("@/views/Mall.vue")
    //   },

    // ]
  },
  {
    path: "/404",
    name: "404",
    component: () => import("@/views/Login.vue"),
  },
];

const router = createRouter({
  history: createWebHistory(),
  routes,
});

export default router;
